package com.weetop.aklyscan.bean;

import android.os.Parcel;
import android.os.Parcelable;

import lombok.Data;

@Data
public class AddressInfo implements Parcelable {
    private String ua_id;
    private String name;
    private String phone;
    private String is_default;
    private String p_code;
    private String c_code;
    private String a_code;
    private String p_name;
    private String c_name;
    private String a_name;
    private String address_detail;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.ua_id);
        dest.writeString(this.name);
        dest.writeString(this.phone);
        dest.writeString(this.is_default);
        dest.writeString(this.p_code);
        dest.writeString(this.c_code);
        dest.writeString(this.a_code);
        dest.writeString(this.p_name);
        dest.writeString(this.c_name);
        dest.writeString(this.a_name);
        dest.writeString(this.address_detail);
    }

    protected AddressInfo(Parcel in) {
        this.ua_id = in.readString();
        this.name = in.readString();
        this.phone = in.readString();
        this.is_default = in.readString();
        this.p_code = in.readString();
        this.c_code = in.readString();
        this.a_code = in.readString();
        this.p_name = in.readString();
        this.c_name = in.readString();
        this.a_name = in.readString();
        this.address_detail = in.readString();
    }

    public static final Parcelable.Creator<AddressInfo> CREATOR = new Parcelable.Creator<AddressInfo>() {
        @Override
        public AddressInfo createFromParcel(Parcel source) {
            return new AddressInfo(source);
        }

        @Override
        public AddressInfo[] newArray(int size) {
            return new AddressInfo[size];
        }
    };
}
